package com.ssh.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ssh.service.RoleService;

@Controller
public class RoleController {
	
	@Autowired
	private RoleService roleService;
	
	@RequestMapping(value="save",method=RequestMethod.GET)
	@ResponseBody
	public String save(){
		Long id = roleService.saveRole();
		System.out.println(id);
		if (id!=0)
			return "success";
		return "demo";
	}
}
